@page "/PodDiagram"
@page "/PodDiagram/{PodName}"
@inherits BlazorApp.Pages.Common.DrawerPageBase<k8s.Models.V1Pod>


@if (Diagram != null)
{
    @if (Pod != null)
    {
//传递了Pod过来，这是弹窗,增加一个新页面展示链接
        <a href=@($"/PodDiagram/{Pod.Metadata.Name}") target="_blank">@L["OpenInNewWindow"]</a>
    }

    @if (Pod == null)
    {
        <div class="diagram-toolbar">
            <Search Placeholder=" Search Pod Name"
                    WrapperStyle="width: 400px;" ClassicSearchIcon
                    AllowClear EnterButton="@($"{L["Search"]}")"
                    @bind-Value="@PodName" OnSearch="OnSearch">
            </Search>
        </div>
    }

    <div class="diagram-container">
        <CascadingValue Value="Diagram">
            <DiagramCanvas>
            </DiagramCanvas>
        </CascadingValue>
    </div>
}
